'use strict';
module.exports = app => {
  const { STRING, INTEGER } = app.Sequelize;
    return app.model.define(
        'admin',
        {
            id: {type: INTEGER, primaryKey: true, autoIncrement: true},
            username: STRING(255),
            nickname: STRING(255),
            password: STRING(255),
            status: INTEGER,
            type: INTEGER,
        },
        {
            tableName: 'admin',
            timestamps: true, // 启用时间戳(createdAt, updatedAt)
            updatedAt: 'updated_time', // 不想要 updatedAt
            createdAt: 'create_time', // 想要  createdAt 但是希望名称叫做 created_at
        }
    )
};
